<?php 
	$domain = $site['domain'];
	$tipModel = new TipManager();
	$tipArray = $tipModel->getTipByFields( array('domain' => $domain, 'controller_view' => 'default_index') );
	$tips = isset($tipArray[$domain]['default_index'])? $tipArray[$domain]['default_index'] : array();

?>


<div id="nav" style="overflow:visible;">
	<ul>
		<li class="current item"><a href="<?php echo url('default/index'); ?>"
			title=""><img src="<?php echo $img_url; ?>nav_button_01.png" alt="" /> </a></li>
		<li class="item" style="position:relative; overflow:visible;">
			<?php if(isset($user['credit']) && ($user['credit'] == 0)){$_COOKIE['credittip'] = 'displayed';} 
				  if(isset($_COOKIE['credittip']) && $_COOKIE['credittip'] == 'new' || !isset($_COOKIE['credittip'])):
				  	if(isset($tips['credit-tip'])): ?>
					<div id="credit-tip" style="width:<?php echo $tips['credit-tip']['tip_width']; ?>; <?php if( (isset($user['credit']) && ($user['credit'] != 0) || !isset($user['credit']))){echo "display:none;";} ?> position:absolute; left:-100px; top:-55px; border:solid 2px #D9BED0; background-color:<?php echo $tips['credit-tip']['bg_color']; ?>">
						<div style="color:#D9BED0; position:absolute; left:180px; top:40px; font-size:16px;">◆</div>
		    			<div style="color:<?php echo $tips['credit-tip']['bg_color']; ?>; position:absolute; left:180px; top:38px; font-size:16px;">◆</div>
		    			<p style="margin:<?php echo $tips['credit-tip']['tip_padding']; ?>; font-size:<?php echo $tips['credit-tip']['font_size']; ?>; font-weight:bolder; line-height:<?php echo $tips['credit-tip']['tip_lineheight']; ?>; color:<?php echo $tips['credit-tip']['font_color']; ?>; height:<?php echo $tips['credit-tip']['tip_height']; ?>;"><?php echo $tips['credit-tip']['tip_text']; ?></p>
					</div>
			<?php 	endif;
				  endif; ?>
			<a href="<?php echo url('offer/morecredit'); ?>"
			title=""><img src="<?php echo $img_url; ?>nav_button_02.png" alt="" /> </a></li>
		<li class="item"><a href="<?php echo url('common/leaderboard'); ?>"
			title=""><img src="<?php echo $img_url; ?>nav_button_03.png" alt="" /> </a></li>
		
		<?php 
			if (!isset($user))
			{
		?>
		<li class="item">
			<a href="<?php echo url('user/register'); ?>" title=""><img src="<?php echo $img_url; ?>nav_button_04.png" alt=""  /></a>
		</li>
		<?php
			}
		?>
		
		<li class="item"><a href="<?php echo url('user/account'); ?>" title=""><img
				src="<?php echo $img_url; ?>nav_button_05.png" alt="" /> </a></li>
		<li class="clear"></li>
	</ul>
	<?php $this->_element('social'); ?>
</div>
